<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="node_modules/vue/dist/vue.js"></script>
<body>
<div id="app">

    <button @click="show=!show">点我</button>
    <h2 v-if="show">haha</h2>
</div>

<script>

    const app = new Vue({
        el: "#app",
        data: {
            show:true,
        }
        }
    );
</script>
</body>
</html>